New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change EventList from Table subclass to attribute #754
Conversation
Please add a test for stacking event lists |
@adonath @joleroi I'm not done here adapting the code and test to the new EventList class, and the diff is already messy and hard to review. But maybe you can have a quick look at this class EventList(object):
def __init__(self, table):
self.table = table Any comments? |
@cdeil I've had a quick look at the changes and I don't have any specific comments. I think introducing the |
table = Table.read(str(filename), **kwargs) | ||
return cls(table=table) | ||
|
||
def info(self, file=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this to __str__
(and add an info method calling it if you like). see http://docs.gammapy.org/en/latest/development/howto.html#object-summary-info-string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cdeil Looks good from a very superficial look. Only one comment.
I've finished up this PR and updated the description above. |
The only fail is this: |
This pull request:
EventList
from anastropy.table.Table
sub-class to a class with anastropy.table.Table
attribute.EventList.select_row_subset
method that dispatches toEventList.table
and is called everywhere row subset selection occurs.GTI
from anastropy.table.Table
sub-class to a class with anastropy.table.Table
attribute.EventList
test with a Fermi-LAT event list (make some IACT-specific columns optional, e.g. in print output)EventListChecker
EventList
EventList
related code